<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="业务通知" name="first">
        <thotelnoticeservice />
      </el-tab-pane>
      <el-tab-pane label="系统消息" name="second">
        <thotelnoticesyslog />
      </el-tab-pane>
      <el-tab-pane label="更新日志" name="third">
        <thotelnoticeupdatelog />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import thotelnoticesyslog from "./thotelnoticesyslog";
  import thotelnoticeupdatelog from "./thotelnoticeupdatelog";
  import thotelnoticeservice from "./thotelnoticeservice";
  export default {
    data() {
      return {
        activeName: 'first',
      };
    },
    watch: {
        '$route' (to, from) {
            if(this.$route.path.indexOf("noticelog") != -1){
              this.getData(this.$route.query.activeName)
            }
        }
    },
    methods: {
      async getData (activeName) {
        if(!activeName){
          this.activeName = 'first'
          return
        }
        this.activeName = activeName
      }
    },
    mounted:function(){

    },
    components: {
      thotelnoticesyslog,
      thotelnoticeupdatelog,
      thotelnoticeservice,
    }
  };
</script>

<style>
</style>
